<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SoupSocket</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch06.html" title="Low-level Networking API">
<link rel="prev" href="SoupAddress.html" title="SoupAddress">
<link rel="next" href="ch07.html" title="Experimental streaming API">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="SoupAddress.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch06.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libsoup Reference Manual</th>
<td><a accesskey="n" href="ch07.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#SoupSocket.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#SoupSocket.description" class="shortcut">Description</a>
                   | 
                  <a href="#SoupSocket.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#SoupSocket.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#SoupSocket.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="SoupSocket"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="SoupSocket.top_of_page"></a>SoupSocket</span></h2>
<p>SoupSocket — A network socket</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="SoupSocket.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libsoup/soup.h&gt;

                    <a class="link" href="SoupSocket.html#SoupSocket-struct" title="SoupSocket">SoupSocket</a>;
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="returnvalue">SoupSocket</span></a> *        <a class="link" href="SoupSocket.html#soup-socket-new" title="soup_socket_new ()">soup_socket_new</a>                     (<em class="parameter"><code>const <span class="type">char</span> *optname1</code></em>,
                                                         <em class="parameter"><code>...</code></em>);

<span class="returnvalue">void</span>                (<a class="link" href="SoupSocket.html#SoupSocketCallback" title="SoupSocketCallback ()">*SoupSocketCallback</a>)               (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> status</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="SoupSocket.html#soup-socket-connect-async" title="soup_socket_connect_async ()">soup_socket_connect_async</a>           (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupSocket.html#SoupSocketCallback" title="SoupSocketCallback ()"><span class="type">SoupSocketCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="SoupSocket.html#soup-socket-connect-sync" title="soup_socket_connect_sync ()">soup_socket_connect_sync</a>            (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupSocket.html#soup-socket-listen" title="soup_socket_listen ()">soup_socket_listen</a>                  (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);

<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupSocket.html#soup-socket-start-ssl" title="soup_socket_start_ssl ()">soup_socket_start_ssl</a>               (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupSocket.html#soup-socket-start-proxy-ssl" title="soup_socket_start_proxy_ssl ()">soup_socket_start_proxy_ssl</a>         (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *ssl_host</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupSocket.html#soup-socket-is-ssl" title="soup_socket_is_ssl ()">soup_socket_is_ssl</a>                  (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="SoupSocket.html#soup-socket-disconnect" title="soup_socket_disconnect ()">soup_socket_disconnect</a>              (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="SoupSocket.html#soup-socket-is-connected" title="soup_socket_is_connected ()">soup_socket_is_connected</a>            (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);

<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       <a class="link" href="SoupSocket.html#soup-socket-get-local-address" title="soup_socket_get_local_address ()">soup_socket_get_local_address</a>       (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);
<a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       <a class="link" href="SoupSocket.html#soup-socket-get-remote-address" title="soup_socket_get_remote_address ()">soup_socket_get_remote_address</a>      (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);

enum                <a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus">SoupSocketIOStatus</a>;
<a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a>  <a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()">soup_socket_read</a>                    (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *nread</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a>  <a class="link" href="SoupSocket.html#soup-socket-read-until" title="soup_socket_read_until ()">soup_socket_read_until</a>              (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> boundary</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> boundary_len</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *nread</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *got_boundary</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a>  <a class="link" href="SoupSocket.html#soup-socket-write" title="soup_socket_write ()">soup_socket_write</a>                   (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *nwrote</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);

#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-LOCAL-ADDRESS:CAPS" title="SOUP_SOCKET_LOCAL_ADDRESS">SOUP_SOCKET_LOCAL_ADDRESS</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-REMOTE-ADDRESS:CAPS" title="SOUP_SOCKET_REMOTE_ADDRESS">SOUP_SOCKET_REMOTE_ADDRESS</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-FLAG-NONBLOCKING:CAPS" title="SOUP_SOCKET_FLAG_NONBLOCKING">SOUP_SOCKET_FLAG_NONBLOCKING</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-IS-SERVER:CAPS" title="SOUP_SOCKET_IS_SERVER">SOUP_SOCKET_IS_SERVER</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-SSL-CREDENTIALS:CAPS" title="SOUP_SOCKET_SSL_CREDENTIALS">SOUP_SOCKET_SSL_CREDENTIALS</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-ASYNC-CONTEXT:CAPS" title="SOUP_SOCKET_ASYNC_CONTEXT">SOUP_SOCKET_ASYNC_CONTEXT</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-TIMEOUT:CAPS" title="SOUP_SOCKET_TIMEOUT">SOUP_SOCKET_TIMEOUT</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-SSL-FALLBACK:CAPS" title="SOUP_SOCKET_SSL_FALLBACK">SOUP_SOCKET_SSL_FALLBACK</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-SSL-STRICT:CAPS" title="SOUP_SOCKET_SSL_STRICT">SOUP_SOCKET_SSL_STRICT</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-TLS-CERTIFICATE:CAPS" title="SOUP_SOCKET_TLS_CERTIFICATE">SOUP_SOCKET_TLS_CERTIFICATE</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-TLS-ERRORS:CAPS" title="SOUP_SOCKET_TLS_ERRORS">SOUP_SOCKET_TLS_ERRORS</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-TRUSTED-CERTIFICATE:CAPS" title="SOUP_SOCKET_TRUSTED_CERTIFICATE">SOUP_SOCKET_TRUSTED_CERTIFICATE</a>
#define             <a class="link" href="SoupSocket.html#SOUP-SOCKET-USE-THREAD-CONTEXT:CAPS" title="SOUP_SOCKET_USE_THREAD_CONTEXT">SOUP_SOCKET_USE_THREAD_CONTEXT</a>
</pre>
</div>
<div class="refsect1">
<a name="SoupSocket.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----SoupSocket
</pre>
</div>
<div class="refsect1">
<a name="SoupSocket.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="SoupSocket.html#SoupSocket--async-context" title='The "async-context" property'>async-context</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              : Read / Write / Construct Only
  "<a class="link" href="SoupSocket.html#SoupSocket--clean-dispose" title='The "clean-dispose" property'>clean-dispose</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Write / Construct Only
  "<a class="link" href="SoupSocket.html#SoupSocket--is-server" title='The "is-server" property'>is-server</a>"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read
  "<a class="link" href="SoupSocket.html#SoupSocket--local-address" title='The "local-address" property'>local-address</a>"            <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>*          : Read / Write / Construct Only
  "<a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'>non-blocking</a>"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
  "<a class="link" href="SoupSocket.html#SoupSocket--remote-address" title='The "remote-address" property'>remote-address</a>"           <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>*          : Read / Write / Construct Only
  "<a class="link" href="SoupSocket.html#SoupSocket--ssl-creds" title='The "ssl-creds" property'>ssl-creds</a>"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              : Read / Write
  "<a class="link" href="SoupSocket.html#SoupSocket--ssl-fallback" title='The "ssl-fallback" property'>ssl-fallback</a>"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only
  "<a class="link" href="SoupSocket.html#SoupSocket--ssl-strict" title='The "ssl-strict" property'>ssl-strict</a>"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only
  "<a class="link" href="SoupSocket.html#SoupSocket--timeout" title='The "timeout" property'>timeout</a>"                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write
  "<a class="link" href="SoupSocket.html#SoupSocket--tls-certificate" title='The "tls-certificate" property'>tls-certificate</a>"          <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a>*      : Read
  "<a class="link" href="SoupSocket.html#SoupSocket--tls-errors" title='The "tls-errors" property'>tls-errors</a>"               <a href="http://library.gnome.org/devel/gio/unstable/gio-TLS-Overview.html#GTlsCertificateFlags"><span class="type">GTlsCertificateFlags</span></a>  : Read
  "<a class="link" href="SoupSocket.html#SoupSocket--trusted-certificate" title='The "trusted-certificate" property'>trusted-certificate</a>"      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read
  "<a class="link" href="SoupSocket.html#SoupSocket--use-proxy" title='The "use-proxy" property'>use-proxy</a>"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only
  "<a class="link" href="SoupSocket.html#SoupSocket--use-thread-context" title='The "use-thread-context" property'>use-thread-context</a>"       <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1">
<a name="SoupSocket.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="SoupSocket.html#SoupSocket-disconnected" title='The "disconnected" signal'>disconnected</a>"                                   : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
  "<a class="link" href="SoupSocket.html#SoupSocket-event" title='The "event" signal'>event</a>"                                          : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
  "<a class="link" href="SoupSocket.html#SoupSocket-new-connection" title='The "new-connection" signal'>new-connection</a>"                                 : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
  "<a class="link" href="SoupSocket.html#SoupSocket-readable" title='The "readable" signal'>readable</a>"                                       : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
  "<a class="link" href="SoupSocket.html#SoupSocket-writable" title='The "writable" signal'>writable</a>"                                       : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
</pre>
</div>
<div class="refsect1">
<a name="SoupSocket.description"></a><h2>Description</h2>
<p>
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> is libsoup's TCP socket type. While it is primarily
intended for internal use, <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>s are exposed in the
API in various places, and some of their methods (eg,
<a class="link" href="SoupSocket.html#soup-socket-get-remote-address" title="soup_socket_get_remote_address ()"><code class="function">soup_socket_get_remote_address()</code></a>) may be useful to applications.
</p>
</div>
<div class="refsect1">
<a name="SoupSocket.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="SoupSocket-struct"></a><h3>SoupSocket</h3>
<pre class="programlisting">typedef struct _SoupSocket SoupSocket;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-new"></a><h3>soup_socket_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="returnvalue">SoupSocket</span></a> *        soup_socket_new                     (<em class="parameter"><code>const <span class="type">char</span> *optname1</code></em>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
Creates a new (disconnected) socket
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>optname1</code></em> :</span></p></td>
<td>name of first property to set (or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>value of <em class="parameter"><code>optname1</code></em>, followed by additional property/value pairs</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new socket</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocketCallback"></a><h3>SoupSocketCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*SoupSocketCallback)               (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> status</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
The callback function passed to <a class="link" href="SoupSocket.html#soup-socket-connect-async" title="soup_socket_connect_async ()"><code class="function">soup_socket_connect_async()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
<td>an HTTP status code indicating success or failure</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>the data passed to <a class="link" href="SoupSocket.html#soup-socket-connect-async" title="soup_socket_connect_async ()"><code class="function">soup_socket_connect_async()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-connect-async"></a><h3>soup_socket_connect_async ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_socket_connect_async           (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a class="link" href="SoupSocket.html#SoupSocketCallback" title="SoupSocketCallback ()"><span class="type">SoupSocketCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
Begins asynchronously connecting to <em class="parameter"><code>sock</code></em>'s remote address. The
socket will call <em class="parameter"><code>callback</code></em> when it succeeds or fails (but not
before returning from this function).
</p>
<p>
If <em class="parameter"><code>cancellable</code></em> is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it can be used to cancel the
connection. <em class="parameter"><code>callback</code></em> will still be invoked in this case, with a
status of <a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-CANCELLED:CAPS"><code class="literal">SOUP_STATUS_CANCELLED</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a client <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> (which must not already be connected)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>callback to call after connecting. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>callback</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-connect-sync"></a><h3>soup_socket_connect_sync ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               soup_socket_connect_sync            (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
<p>
Attempt to synchronously connect <em class="parameter"><code>sock</code></em> to its remote address.
</p>
<p>
If <em class="parameter"><code>cancellable</code></em> is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, it can be used to cancel the
connection, in which case <a class="link" href="SoupSocket.html#soup-socket-connect-sync" title="soup_socket_connect_sync ()"><code class="function">soup_socket_connect_sync()</code></a> will return
<a class="link" href="libsoup-2.4-soup-status.html#SOUP-STATUS-CANCELLED:CAPS"><code class="literal">SOUP_STATUS_CANCELLED</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a client <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> (which must not already be connected)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a success or failure code.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-listen"></a><h3>soup_socket_listen ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_socket_listen                  (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Makes <em class="parameter"><code>sock</code></em> start listening on its local address. When connections
come in, <em class="parameter"><code>sock</code></em> will emit <a class="link" href="SoupSocket.html#SoupSocket-new-connection" title='The "new-connection" signal'><span class="type">"new_connection"</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a server <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> (which must not already be connected or
listening)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>whether or not <em class="parameter"><code>sock</code></em> is now listening.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-start-ssl"></a><h3>soup_socket_start_ssl ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_socket_start_ssl               (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
<p>
Starts using SSL on <em class="parameter"><code>socket</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>success or failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-start-proxy-ssl"></a><h3>soup_socket_start_proxy_ssl ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_socket_start_proxy_ssl         (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *ssl_host</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
<p>
Starts using SSL on <em class="parameter"><code>socket</code></em>, expecting to find a host named
<em class="parameter"><code>ssl_host</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ssl_host</code></em> :</span></p></td>
<td>hostname of the SSL server</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>success or failure</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-is-ssl"></a><h3>soup_socket_is_ssl ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_socket_is_ssl                  (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Tests if <em class="parameter"><code>sock</code></em> is doing (or has attempted to do) SSL.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>sock</code></em> has SSL credentials set</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-disconnect"></a><h3>soup_socket_disconnect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                soup_socket_disconnect              (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Disconnects <em class="parameter"><code>sock</code></em>. Any further read or write attempts on it will
fail.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-is-connected"></a><h3>soup_socket_is_connected ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            soup_socket_is_connected            (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Tests if <em class="parameter"><code>sock</code></em> is connected to another host
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-get-local-address"></a><h3>soup_socket_get_local_address ()</h3>
<pre class="programlisting"><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       soup_socket_get_local_address       (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Returns the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> corresponding to the local end of <em class="parameter"><code>sock</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-get-remote-address"></a><h3>soup_socket_get_remote_address ()</h3>
<pre class="programlisting"><a class="link" href="SoupAddress.html" title="SoupAddress"><span class="returnvalue">SoupAddress</span></a> *       soup_socket_get_remote_address      (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>);</pre>
<p>
Returns the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a> corresponding to the remote end of <em class="parameter"><code>sock</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocketIOStatus"></a><h3>enum SoupSocketIOStatus</h3>
<pre class="programlisting">typedef enum {
	SOUP_SOCKET_OK,
	SOUP_SOCKET_WOULD_BLOCK,
	SOUP_SOCKET_EOF,
	SOUP_SOCKET_ERROR
} SoupSocketIOStatus;
</pre>
<p>
Return value from the <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> IO methods.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="SOUP-SOCKET-OK:CAPS"></a><span class="term"><code class="literal">SOUP_SOCKET_OK</code></span></p></td>
<td>Success
</td>
</tr>
<tr>
<td><p><a name="SOUP-SOCKET-WOULD-BLOCK:CAPS"></a><span class="term"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></span></p></td>
<td>Cannot read/write any more at this time
</td>
</tr>
<tr>
<td><p><a name="SOUP-SOCKET-EOF:CAPS"></a><span class="term"><code class="literal">SOUP_SOCKET_EOF</code></span></p></td>
<td>End of file
</td>
</tr>
<tr>
<td><p><a name="SOUP-SOCKET-ERROR:CAPS"></a><span class="term"><code class="literal">SOUP_SOCKET_ERROR</code></span></p></td>
<td>Other error
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-read"></a><h3>soup_socket_read ()</h3>
<pre class="programlisting"><a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a>  soup_socket_read                    (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *nread</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Attempts to read up to <em class="parameter"><code>len</code></em> bytes from <em class="parameter"><code>sock</code></em> into <em class="parameter"><code>buffer</code></em>. If some
data is successfully read, <a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a> will return
<a class="link" href="SoupSocket.html#SOUP-SOCKET-OK:CAPS"><code class="literal">SOUP_SOCKET_OK</code></a>, and *<em class="parameter"><code>nread</code></em> will contain the number of bytes
actually read (which may be less than <em class="parameter"><code>len</code></em>).
</p>
<p>
If <em class="parameter"><code>sock</code></em> is non-blocking, and no data is available, the return
value will be <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>. In this case, the caller
can connect to the <a class="link" href="SoupSocket.html#SoupSocket-readable" title='The "readable" signal'><span class="type">"readable"</span></a> signal to know when there
is more data to read. (NB: You MUST read all available data off the
socket first. <a class="link" href="SoupSocket.html#SoupSocket-readable" title='The "readable" signal'><span class="type">"readable"</span></a> is only emitted after
<a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a> returns <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>, and it is only
emitted once. See the documentation for <a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'><span class="type">"non-blocking"</span></a>.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>buffer to read into</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>size of <em class="parameter"><code>buffer</code></em> in bytes</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nread</code></em> :</span></p></td>
<td>on return, the number of bytes read into <em class="parameter"><code>buffer</code></em>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>error pointer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="type">SoupSocketIOStatus</span></a>, as described above (or
<a class="link" href="SoupSocket.html#SOUP-SOCKET-EOF:CAPS"><code class="literal">SOUP_SOCKET_EOF</code></a> if the socket is no longer connected, or
<a class="link" href="SoupSocket.html#SOUP-SOCKET-ERROR:CAPS"><code class="literal">SOUP_SOCKET_ERROR</code></a> on any other error, in which case <em class="parameter"><code>error</code></em> will
also be set).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-read-until"></a><h3>soup_socket_read_until ()</h3>
<pre class="programlisting"><a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a>  soup_socket_read_until              (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> boundary</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> boundary_len</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *nread</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *got_boundary</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Like <a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a>, but reads no further than the first
occurrence of <em class="parameter"><code>boundary</code></em>. (If the boundary is found, it will be
included in the returned data, and *<em class="parameter"><code>got_boundary</code></em> will be set to
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.) Any data after the boundary will returned in future reads.
</p>
<p>
<a class="link" href="SoupSocket.html#soup-socket-read-until" title="soup_socket_read_until ()"><code class="function">soup_socket_read_until()</code></a> will almost always return fewer than <em class="parameter"><code>len</code></em>
bytes: if the boundary is found, then it will only return the bytes
up until the end of the boundary, and if the boundary is not found,
then it will leave the last <code class="literal">(boundary_len - 1)</code>
bytes in its internal buffer, in case they form the start of the
boundary string. Thus, <em class="parameter"><code>len</code></em> normally needs to be at least 1 byte
longer than <em class="parameter"><code>boundary_len</code></em> if you want to make any progress at all.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>buffer to read into</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>size of <em class="parameter"><code>buffer</code></em> in bytes</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>boundary</code></em> :</span></p></td>
<td>boundary to read until</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>boundary_len</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>boundary</code></em> in bytes</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nread</code></em> :</span></p></td>
<td>on return, the number of bytes read into <em class="parameter"><code>buffer</code></em>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>got_boundary</code></em> :</span></p></td>
<td>on return, whether or not the data in <em class="parameter"><code>buffer</code></em>
ends with the boundary string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>error pointer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>as for <a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="soup-socket-write"></a><h3>soup_socket_write ()</h3>
<pre class="programlisting"><a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="returnvalue">SoupSocketIOStatus</span></a>  soup_socket_write                   (<em class="parameter"><code><a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *nwrote</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Attempts to write <em class="parameter"><code>len</code></em> bytes from <em class="parameter"><code>buffer</code></em> to <em class="parameter"><code>sock</code></em>. If some data is
successfully written, the return status will be <a class="link" href="SoupSocket.html#SOUP-SOCKET-OK:CAPS"><code class="literal">SOUP_SOCKET_OK</code></a>,
and *<em class="parameter"><code>nwrote</code></em> will contain the number of bytes actually written
(which may be less than <em class="parameter"><code>len</code></em>).
</p>
<p>
If <em class="parameter"><code>sock</code></em> is non-blocking, and no data could be written right away,
the return value will be <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>. In this case,
the caller can connect to the <a class="link" href="SoupSocket.html#SoupSocket-writable" title='The "writable" signal'><span class="type">"writable"</span></a> signal to know
when more data can be written. (NB: <a class="link" href="SoupSocket.html#SoupSocket-writable" title='The "writable" signal'><span class="type">"writable"</span></a> is only
emitted after <a class="link" href="SoupSocket.html#soup-socket-write" title="soup_socket_write ()"><code class="function">soup_socket_write()</code></a> returns <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>,
and it is only emitted once. See the documentation for
<a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'><span class="type">"non-blocking"</span></a>.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>data to write</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>size of <em class="parameter"><code>buffer</code></em>, in bytes</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nwrote</code></em> :</span></p></td>
<td>on return, number of bytes written. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>error pointer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="SoupSocket.html#SoupSocketIOStatus" title="enum SoupSocketIOStatus"><span class="type">SoupSocketIOStatus</span></a>, as described above (or
<a class="link" href="SoupSocket.html#SOUP-SOCKET-EOF:CAPS"><code class="literal">SOUP_SOCKET_EOF</code></a> or <a class="link" href="SoupSocket.html#SOUP-SOCKET-ERROR:CAPS"><code class="literal">SOUP_SOCKET_ERROR</code></a>. <em class="parameter"><code>error</code></em> will be set if the
return value is <a class="link" href="SoupSocket.html#SOUP-SOCKET-ERROR:CAPS"><code class="literal">SOUP_SOCKET_ERROR</code></a>.)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-LOCAL-ADDRESS:CAPS"></a><h3>SOUP_SOCKET_LOCAL_ADDRESS</h3>
<pre class="programlisting">#define SOUP_SOCKET_LOCAL_ADDRESS       "local-address"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--local-address" title='The "local-address" property'><span class="type">"local-address"</span></a> property. (Address
of local end of socket.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-REMOTE-ADDRESS:CAPS"></a><h3>SOUP_SOCKET_REMOTE_ADDRESS</h3>
<pre class="programlisting">#define SOUP_SOCKET_REMOTE_ADDRESS      "remote-address"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--remote-address" title='The "remote-address" property'><span class="type">"remote-address"</span></a> property. (Address
of remote end of socket.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-FLAG-NONBLOCKING:CAPS"></a><h3>SOUP_SOCKET_FLAG_NONBLOCKING</h3>
<pre class="programlisting">#define SOUP_SOCKET_FLAG_NONBLOCKING    "non-blocking"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'><span class="type">"non-blocking"</span></a> property. (Whether
or not the socket uses non-blocking I/O.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-IS-SERVER:CAPS"></a><h3>SOUP_SOCKET_IS_SERVER</h3>
<pre class="programlisting">#define SOUP_SOCKET_IS_SERVER           "is-server"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--is-server" title='The "is-server" property'><span class="type">"is-server"</span></a> property. (Whether or
not the socket is a server socket.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-SSL-CREDENTIALS:CAPS"></a><h3>SOUP_SOCKET_SSL_CREDENTIALS</h3>
<pre class="programlisting">#define SOUP_SOCKET_SSL_CREDENTIALS     "ssl-creds"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--ssl-creds" title='The "ssl-creds" property'><span class="type">"ssl-creds"</span></a> property.
(SSL credential information.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-ASYNC-CONTEXT:CAPS"></a><h3>SOUP_SOCKET_ASYNC_CONTEXT</h3>
<pre class="programlisting">#define SOUP_SOCKET_ASYNC_CONTEXT       "async-context"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--async-context" title='The "async-context" property'><span class="type">"async-context"</span></a> property. (The
socket's <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a>.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-TIMEOUT:CAPS"></a><h3>SOUP_SOCKET_TIMEOUT</h3>
<pre class="programlisting">#define SOUP_SOCKET_TIMEOUT             "timeout"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--timeout" title='The "timeout" property'><span class="type">"timeout"</span></a> property. (The timeout
in seconds for blocking socket I/O operations.)
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-SSL-FALLBACK:CAPS"></a><h3>SOUP_SOCKET_SSL_FALLBACK</h3>
<pre class="programlisting">#define SOUP_SOCKET_SSL_FALLBACK        "ssl-fallback"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--ssl-fallback" title='The "ssl-fallback" property'><span class="type">"ssl-fallback"</span></a> property.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-SSL-STRICT:CAPS"></a><h3>SOUP_SOCKET_SSL_STRICT</h3>
<pre class="programlisting">#define SOUP_SOCKET_SSL_STRICT          "ssl-strict"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--ssl-strict" title='The "ssl-strict" property'><span class="type">"ssl-strict"</span></a> property.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-TLS-CERTIFICATE:CAPS"></a><h3>SOUP_SOCKET_TLS_CERTIFICATE</h3>
<pre class="programlisting">#define SOUP_SOCKET_TLS_CERTIFICATE     "tls-certificate"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--tls-certificate" title='The "tls-certificate" property'><span class="type">"tls-certificate"</span></a>
property. Note that this property's value is only useful
if the socket is for a TLS connection, and only reliable
after some data has been transferred to or from it.
</p>
<p class="since">Since 2.34</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-TLS-ERRORS:CAPS"></a><h3>SOUP_SOCKET_TLS_ERRORS</h3>
<pre class="programlisting">#define SOUP_SOCKET_TLS_ERRORS          "tls-errors"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--tls-errors" title='The "tls-errors" property'><span class="type">"tls-errors"</span></a>
property. Note that this property's value is only useful
if the socket is for a TLS connection, and only reliable
after some data has been transferred to or from it.
</p>
<p class="since">Since 2.34</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-TRUSTED-CERTIFICATE:CAPS"></a><h3>SOUP_SOCKET_TRUSTED_CERTIFICATE</h3>
<pre class="programlisting">#define SOUP_SOCKET_TRUSTED_CERTIFICATE "trusted-certificate"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--trusted-certificate" title='The "trusted-certificate" property'><span class="type">"trusted-certificate"</span></a>
property.
</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-SOCKET-USE-THREAD-CONTEXT:CAPS"></a><h3>SOUP_SOCKET_USE_THREAD_CONTEXT</h3>
<pre class="programlisting">#define SOUP_SOCKET_USE_THREAD_CONTEXT  "use-thread-context"
</pre>
<p>
Alias for the <a class="link" href="SoupSocket.html#SoupSocket--use-thread-context" title='The "use-thread-context" property'><span class="type">"use-thread-context"</span></a> property. (Use
<a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-get-thread-default"><code class="function">g_main_context_get_thread_default()</code></a>)
</p>
<p class="since">Since 2.36.1</p>
</div>
</div>
<div class="refsect1">
<a name="SoupSocket.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="SoupSocket--async-context"></a><h3>The <code class="literal">"async-context"</code> property</h3>
<pre class="programlisting">  "async-context"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              : Read / Write / Construct Only</pre>
<p>The GMainContext to dispatch this socket's async I/O in.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--clean-dispose"></a><h3>The <code class="literal">"clean-dispose"</code> property</h3>
<pre class="programlisting">  "clean-dispose"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Write / Construct Only</pre>
<p>Warn on unclean dispose.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--is-server"></a><h3>The <code class="literal">"is-server"</code> property</h3>
<pre class="programlisting">  "is-server"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read</pre>
<p>Whether or not the socket is a server socket.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--local-address"></a><h3>The <code class="literal">"local-address"</code> property</h3>
<pre class="programlisting">  "local-address"            <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>*          : Read / Write / Construct Only</pre>
<p>Address of local end of socket.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--non-blocking"></a><h3>The <code class="literal">"non-blocking"</code> property</h3>
<pre class="programlisting">  "non-blocking"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
<p>
Whether or not the socket uses non-blocking I/O.
</p>
<p>
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>'s I/O methods are designed around the idea of
using a single codepath for both synchronous and
asynchronous I/O. If you want to read off a <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>,
the "correct" way to do it is to call <a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a> or
<a class="link" href="SoupSocket.html#soup-socket-read-until" title="soup_socket_read_until ()"><code class="function">soup_socket_read_until()</code></a> repeatedly until you have read
everything you want. If it returns <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>
at any point, stop reading and wait for it to emit the
<a class="link" href="SoupSocket.html#SoupSocket-readable" title='The "readable" signal'><span class="type">"readable"</span></a> signal. Then go back to the
reading-as-much-as-you-can loop. Likewise, for writing to a
<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>, you should call <a class="link" href="SoupSocket.html#soup-socket-write" title="soup_socket_write ()"><code class="function">soup_socket_write()</code></a> either
until you have written everything, or it returns
<a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a> (in which case you wait for
<a class="link" href="SoupSocket.html#SoupSocket-writable" title='The "writable" signal'><span class="type">"writable"</span></a> and then go back into the loop).
</p>
<p>
Code written this way will work correctly with both
blocking and non-blocking sockets; blocking sockets will
simply never return <a class="link" href="SoupSocket.html#SOUP-SOCKET-WOULD-BLOCK:CAPS"><code class="literal">SOUP_SOCKET_WOULD_BLOCK</code></a>, and so the
code that handles that case just won't get used for them.
</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--remote-address"></a><h3>The <code class="literal">"remote-address"</code> property</h3>
<pre class="programlisting">  "remote-address"           <a class="link" href="SoupAddress.html" title="SoupAddress"><span class="type">SoupAddress</span></a>*          : Read / Write / Construct Only</pre>
<p>Address of remote end of socket.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--ssl-creds"></a><h3>The <code class="literal">"ssl-creds"</code> property</h3>
<pre class="programlisting">  "ssl-creds"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              : Read / Write</pre>
<p>SSL credential information, passed from the session to the SSL implementation.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--ssl-fallback"></a><h3>The <code class="literal">"ssl-fallback"</code> property</h3>
<pre class="programlisting">  "ssl-fallback"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only</pre>
<p>Use SSLv3 instead of TLS (client-side only).</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--ssl-strict"></a><h3>The <code class="literal">"ssl-strict"</code> property</h3>
<pre class="programlisting">  "ssl-strict"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only</pre>
<p>Whether certificate errors should be considered a connection error.</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--timeout"></a><h3>The <code class="literal">"timeout"</code> property</h3>
<pre class="programlisting">  "timeout"                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write</pre>
<p>Value in seconds to timeout a blocking I/O.</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--tls-certificate"></a><h3>The <code class="literal">"tls-certificate"</code> property</h3>
<pre class="programlisting">  "tls-certificate"          <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a>*      : Read</pre>
<p>The peer's TLS certificate.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--tls-errors"></a><h3>The <code class="literal">"tls-errors"</code> property</h3>
<pre class="programlisting">  "tls-errors"               <a href="http://library.gnome.org/devel/gio/unstable/gio-TLS-Overview.html#GTlsCertificateFlags"><span class="type">GTlsCertificateFlags</span></a>  : Read</pre>
<p>Errors with the peer's TLS certificate.</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--trusted-certificate"></a><h3>The <code class="literal">"trusted-certificate"</code> property</h3>
<pre class="programlisting">  "trusted-certificate"      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read</pre>
<p>Whether the server certificate is trusted, if this is an SSL socket.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--use-proxy"></a><h3>The <code class="literal">"use-proxy"</code> property</h3>
<pre class="programlisting">  "use-proxy"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only</pre>
<p>Use #GProxyResolver.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket--use-thread-context"></a><h3>The <code class="literal">"use-thread-context"</code> property</h3>
<pre class="programlisting">  "use-thread-context"       <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct Only</pre>
<p>
Use <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-get-thread-default"><code class="function">g_main_context_get_thread_default()</code></a>.
</p>
<p>Default value: FALSE</p>
<p class="since">Since 2.36.1</p>
</div>
</div>
<div class="refsect1">
<a name="SoupSocket.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="SoupSocket-disconnected"></a><h3>The <code class="literal">"disconnected"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
<p>
Emitted when the socket is disconnected, for whatever
reason.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket-event"></a><h3>The <code class="literal">"event"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>        *sock,
                                                        <a href="http://library.gnome.org/devel/gio/unstable/GSocketClient.html#GSocketClientEvent"><span class="type">GSocketClientEvent</span></a> event,
                                                        <a href="http://library.gnome.org/devel/gio/unstable/GIOStream.html"><span class="type">GIOStream</span></a>         *connection,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>           user_data)       : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
<p>
Emitted when a network-related event occurs. See
<a href="http://library.gnome.org/devel/gio/unstable/GSocketClient.html#GSocketClient-event"><span class="type">"event"</span></a> for more details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>the event that occurred</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>the current connection state</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.38</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket-new-connection"></a><h3>The <code class="literal">"new-connection"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock,
                                                        <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *new,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
Emitted when a listening socket (set up with
<a class="link" href="SoupSocket.html#soup-socket-listen" title="soup_socket_listen ()"><code class="function">soup_socket_listen()</code></a>) receives a new connection.
</p>
<p>
You must ref the <em class="parameter"><code>new</code></em> if you want to keep it; otherwise it
will be destroyed after the signal is emitted.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new</code></em> :</span></p></td>
<td>the new socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket-readable"></a><h3>The <code class="literal">"readable"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
<p>
Emitted when an async socket is readable. See
<a class="link" href="SoupSocket.html#soup-socket-read" title="soup_socket_read ()"><code class="function">soup_socket_read()</code></a>, <a class="link" href="SoupSocket.html#soup-socket-read-until" title="soup_socket_read_until ()"><code class="function">soup_socket_read_until()</code></a> and
<a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'><span class="type">"non-blocking"</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="SoupSocket-writable"></a><h3>The <code class="literal">"writable"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a> *sock,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
<p>
Emitted when an async socket is writable. See
<a class="link" href="SoupSocket.html#soup-socket-write" title="soup_socket_write ()"><code class="function">soup_socket_write()</code></a> and <a class="link" href="SoupSocket.html#SoupSocket--non-blocking" title='The "non-blocking" property'><span class="type">"non-blocking"</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sock</code></em> :</span></p></td>
<td>the socket</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>